$(function(){
        var deleteflag = 0;
		$("#mainMenu li a").click(function(){
            var url;
            var height;
            switch($(this).text()){
                case "概要":
                    url = "main/home.action";
                    height = 800;
                    break;
                case "考勤记录管理":
                    url = "main/record.action";
                    height = 800;
                    break;
                case "班级管理":
                    url = "main/sclass.action";
                    height = 800;
                    break;
                case "学生管理":
                    url = "main/student.action";
                    height = 800;
                    break;
                case "课程管理":
                    url = "main/course.action";
                    height = 800;
                    break;
                case "教师管理":
                    url = "main/teacher.action";
                    height = 800;
                    break;
                case "时间管理":
                    url = "main/schedule.action";
                    height = 800;
                    break;
                case "记录可视化":
                    url = "main/visual.action";
                    height = 800;
                    break;
            }
            $("#myIframe").attr("src",url);
            $("#myIframe").css("height",height);
            $("#mainMenu li").removeClass("active");
            $(this).parent().addClass("active");
		});
        
        $("#batch-delete").click(function(){
            if(deleteflag==0){
                $(".table-striped thead tr").prepend("<th class='delState'></th>");
                $(".table-striped tbody tr").prepend("<td class='delState'><input type='checkbox' name='delLi'></td>");
                $("#batch-delete").text("取消删除");
                
                deleteflag++;
            } else {
                $(".delState").remove();
                $("#batch-delete").text("批量删除");
                deleteflag--;
            }
        });
    
});

/*
function findStudentByPage(Sclass,Start){
		$.ajax(
			{
				type:"post",
				url:"findStudentByPage.action",
				dataType:"json",
				data:{
					Sclass: Sclass,
					Start: Start
				}
			});
} */



function warning() {
	alert("为保证数据完整性，您当前的权限不足以执行此操作");
}